import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'

export default class Footer extends Component {
    static defaultProps = {
        footerList: [
            {
                path: '/app/home',
                name: "首页"
            },
            {
                path: '/app/store',
                name: "商城"
            },
            {
                path: '/app/popularization',
                namr: "科普"
            },
            {
                path: '/app/my',
                name: "我的"
            }
        ]
    }

    render() {
        const { footerList } = this.props
        return (
            <div className="index">
                {
                    footerList.length && footerList.map((item, index) => {
                        return <div className='footer' key={index}>
                            <NavLink to={item.path}>{item.name}</NavLink>
                        </div>
                    })
                }
            </div>
        )
    }
}
